﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
using Justin.FrameWork.Helper;
using Justin.Log;
using Justin.Stock.DAL;
using Justin.Stock.Entities;
using Justin.Stock.Models;

namespace Justin.Stock
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
           

            string fileName = "StockInfo.xml";
            try
            {
                //SqliteHelper.ConnStr = String.Format("Data Source={0};Version=3;Pooling=true;Max Pool Size=100;", Path.Combine(Environment.CurrentDirectory, Constants.DBName));
              
                var form = new DeskStocks(fileName);
                //HideOnStartupApplicationContext context = new HideOnStartupApplicationContext(form);
                JLog.Write(LogMode.Info, "Start");
                Application.Run(form);
            }
            catch (Exception ex)
            {
                JLog.Write(LogMode.Error, ex);
            }
        }
    }
}
